package EX3;

import java.io.*;

/*
    BufferedInputStream类 和 BufferedOutputStream类
    字节缓冲输入输出流：带缓冲区的字节输入、输出流（效率更高）
 */
public class demo2 {
    public static void main(String[] args) throws IOException {
        File f=new File("C:/filea/a.txt");
        BufferedInputStream bis=new BufferedInputStream(new FileInputStream(f));
        BufferedOutputStream bos=new BufferedOutputStream(new FileOutputStream("C:/filea/a6.txt"));
        int n;
        while ((n=bis.read())!=-1){
            bos.write(n);
        }
        bis.close();
        bos.close();
    }
}
